﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Threading;
using System.Globalization;

public partial class followerpart_followermaster : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if ((Session["role_id"] != null) && (int.Parse(Session["role_id"].ToString()) != 3))
            {
                Response.Redirect("~/Default.aspx");

            }
            else
            {
                logout.Visible = true;
                users.Text = Session["user"].ToString().Split(',')[0];

            }

        }
        if (Session["user"] != null)
        {
            lk1.NavigateUrl = Session["url"].ToString();
        }

    }
    protected void Page_Init(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if ((Session["role_id"] == null) || (int.Parse(Session["role_id"].ToString()) != 3))
            {
                Response.Redirect("~/Default.aspx");

            }
            else
            {
                logout.Visible = true;
            }

        }

    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-SA");
        Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("ar-SA");
        Session["CurrentCulture"] = "ar-SA";
        Server.Transfer(Request.Path);
    }
    protected void LinkButton3_Click(object sender, EventArgs e)
    {
        Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
        Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("en-US");
        Session["CurrentCulture"] = "en-US";
        Server.Transfer(Request.Path);
    }
    protected void LinkButton8_Click(object sender, EventArgs e)
    {
        string obj = Session["CurrentCulture"].ToString();

        Session.Clear();
        Session["CurrentCulture"] = obj;
        Thread.CurrentThread.CurrentUICulture = new CultureInfo(obj);
        Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(obj);
        Response.Redirect("~/Default.aspx");
    }
}
